﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CH3_2
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("三个数取最小值");
            float numA = 0.0f, numB = 0.0f, numC = 0.0f;
            Console.Write("请输入第一个数：");
            numA = (float)Convert.ToDouble(Console.ReadLine());
            Console.Write("请输入第二个数：");
            numB = (float)Convert.ToDouble(Console.ReadLine());
            Console.Write("请输入第三个数：");
            numC = (float)Convert.ToDouble(Console.ReadLine());
            float tempResult = 0.0f, result = 0.0f;
            tempResult = numA < numB ? numA : numB;
            result = tempResult < numC ? tempResult : numC;
            Console.WriteLine("输入的三个数字分别为{0}，{1}，{2}，最小值为{3}", numA, numB, numC, result);
            Console.ReadKey();
        }
    }
}
